#include "flash.h"
#include "bsp_stmflash.h"

DEV_STEPPER_e Dev_Stpper[3];

void Write_Flash(const DEV_STEPPER_e *stepper)
{
	uint32_t data[3] = {0x00,0x00,0x00};
	data[0] = stepper[0].STEPPER;
	data[1] = stepper[1].STEPPER;
	data[2] = stepper[2].STEPPER;
	STMFLASH_Write(FLASH_STORE_ADDR,data,3);
}

void Read_Flash(void)
{
	uint32_t data[3] = {0x00,0x00,0x00};
	STMFLASH_Read(FLASH_STORE_ADDR,data,3);
	Dev_Stpper[0].STEPPER = data[0];
	Dev_Stpper[1].STEPPER = data[1];
	Dev_Stpper[2].STEPPER = data[2];
}














